<template>
  <h2>当前求和为：{{ sum }}</h2>
  <button @click="sum++">点我+1</button>
  <h2>当前鼠标点击的坐标是：x:{{ point.x }}   y:{{ point.x }}</h2>
</template>

<script>
import {
  ref,
  reactive,
  onBeforeMount,
  onMounted,
  onBeforeUpdate,
  onUpdated,
  onBeforeUnmount,
  onUnmounted,
} from "vue";
import savePoint from '../hooks/usePoint'
export default {
  name: "Demo",

  setup() {
    //数据
    let sum = ref(0);
    let point = savePoint()
    return {
      sum,
      point
    };
  },
};
</script>
